<link rel="stylesheet" type="text/css" href="/shop/assets/css/prettify.css">
<link rel="stylesheet" type="text/css" href="/shop/assets/css/bootstrap-duallistbox.min.css">
<script src="/shop/assets/js/jquery.bootstrap-duallistbox.min.js"></script>
<script src="/shop/offer/market/addOffer.js"></script>
<div class="panel panel-default" id="market2Offers" data-market-id = "$marketId">
    <div class="panel-heading">
        <h3 class="panel-title">专场管理-添加商品</h3>
    </div>
    <div class="panel-body">
        <div class="form-horizontal form-border">
            <select multiple="multiple" size="10" name="duallistbox_demo1[]">
                #foreach($offer in $offers)
                    <option value="$offer.id" #if($offer.market_id) selected="selected"
                    #end>$offer.offer_name</option>
                #end

            </select>
        </div>


    </div>
    <div class="row">
        <div class="col-sm-offset-8 col-sm-2">
            <button type="submit" id="submitBtn" class="btn btn-primary">确定</button>
            <button type="submit" class="btn btn-primary" id="addoffer-cancelBtn">取消</button>
        </div>
    </div>
</div>

<script>
    var demo1 = $('select[name="duallistbox_demo1[]"]').bootstrapDualListbox();
</script>